Home | History | Annotate | Download | only in src

Lines Matching refs:script

339   Foreign* foreign = Script::cast(wrapper->value())->wrapper();
349 Handle<JSValue> GetScriptWrapper(Handle<Script> script) {
350 if (script->wrapper()->foreign_address() != NULL) {
351 // Return the script wrapper directly from the cache.
353 reinterpret_cast<JSValue**>(script->wrapper()->foreign_address()));
355 Isolate* isolate = script->GetIsolate();
356 // Construct a new script wrapper.
365 if (script->wrapper()->foreign_address() != NULL) {
367 reinterpret_cast<JSValue**>(script->wrapper()->foreign_address()));
370 result->set_value(*script);
379 script->wrapper()->set_foreign_address(
385 // Init line_ends array with code positions of line ends inside script
387 void InitScriptLineEnds(Handle<Script> script) {
388 if (!script->line_ends()->IsUndefined()) return;
390 Isolate* isolate = script->GetIsolate();
392 if (!script->source()->IsString()) {
393 ASSERT(script->source()->IsUndefined());
395 script->set_line_ends(*empty);
396 ASSERT(script->line_ends()->IsFixedArray());
400 Handle<String> src(String::cast(script->source()), isolate);
408 script->set_line_ends(*array);
409 ASSERT(script->line_ends()->IsFixedArray());
472 Script> script, int code_pos) {
473 InitScriptLineEnds(script);
475 FixedArray* line_ends_array = FixedArray::cast(script->line_ends());
481 return script->line_offset()->value();
493 return right + script->line_offset()->value();
498 int GetScriptColumnNumber(Handle<Script> script, int code_pos) {
499 int line_number = GetScriptLineNumber(script, code_pos);
503 FixedArray* line_ends_array = FixedArray::cast(script->line_ends());
504 line_number = line_number - script->line_offset()->value();
505 if (line_number == 0) return code_pos + script->column_offset()->value();
512 int GetScriptLineNumberSafe(Handle<Script> script, int code_pos) {
514 if (!script->line_ends()->IsUndefined()) {
515 return GetScriptLineNumber(script, code_pos);
518 if (!script->source()->IsString()) {
521 String* source = String::cast(script->source());
581 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) {
582 Isolate* isolate = script->GetIsolate();
586 Handle<JSValue> script_wrapper = GetScriptWrapper(script);