| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/accessors.h" | 5 #include "src/accessors.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/execution.h" | 10 #include "src/execution.h" |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); | 656 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); |
| 657 HandleScope scope(isolate); | 657 HandleScope scope(isolate); |
| 658 Handle<Object> object = Utils::OpenHandle(*info.This()); | 658 Handle<Object> object = Utils::OpenHandle(*info.This()); |
| 659 Handle<Script> script( | 659 Handle<Script> script( |
| 660 Script::cast(Handle<JSValue>::cast(object)->value()), isolate); | 660 Script::cast(Handle<JSValue>::cast(object)->value()), isolate); |
| 661 Handle<Object> result = isolate->factory()->undefined_value(); | 661 Handle<Object> result = isolate->factory()->undefined_value(); |
| 662 if (script->compilation_type() == Script::COMPILATION_TYPE_EVAL) { | 662 if (script->compilation_type() == Script::COMPILATION_TYPE_EVAL) { |
| 663 Handle<Code> code(SharedFunctionInfo::cast( | 663 Handle<Code> code(SharedFunctionInfo::cast( |
| 664 script->eval_from_shared())->code()); | 664 script->eval_from_shared())->code()); |
| 665 result = Handle<Object>(Smi::FromInt(code->SourcePosition( | 665 result = Handle<Object>(Smi::FromInt(code->SourcePosition( |
| 666 code->instruction_start() + | |
| 667 script->eval_from_instructions_offset())), | 666 script->eval_from_instructions_offset())), |
| 668 isolate); | 667 isolate); |
| 669 } | 668 } |
| 670 info.GetReturnValue().Set(Utils::ToLocal(result)); | 669 info.GetReturnValue().Set(Utils::ToLocal(result)); |
| 671 } | 670 } |
| 672 | 671 |
| 673 | 672 |
| 674 Handle<AccessorInfo> Accessors::ScriptEvalFromScriptPositionInfo( | 673 Handle<AccessorInfo> Accessors::ScriptEvalFromScriptPositionInfo( |
| 675 Isolate* isolate, PropertyAttributes attributes) { | 674 Isolate* isolate, PropertyAttributes attributes) { |
| 676 Handle<String> name(isolate->factory()->InternalizeOneByteString( | 675 Handle<String> name(isolate->factory()->InternalizeOneByteString( |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 Isolate* isolate = name->GetIsolate(); | 1197 Isolate* isolate = name->GetIsolate(); |
| 1199 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, | 1198 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, |
| 1200 &ModuleSetExport, attributes); | 1199 &ModuleSetExport, attributes); |
| 1201 info->set_data(Smi::FromInt(index)); | 1200 info->set_data(Smi::FromInt(index)); |
| 1202 return info; | 1201 return info; |
| 1203 } | 1202 } |
| 1204 | 1203 |
| 1205 | 1204 |
| 1206 } // namespace internal | 1205 } // namespace internal |
| 1207 } // namespace v8 | 1206 } // namespace v8 |
| OLD | NEW |