Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(798)

Side by Side Diff: src/accessors.cc

Issue 1858773004: Revert of Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 void Accessors::ScriptEvalFromScriptPositionGetter( 654 void Accessors::ScriptEvalFromScriptPositionGetter(
655 v8::Local<v8::Name> name, 655 v8::Local<v8::Name> name,
656 const v8::PropertyCallbackInfo<v8::Value>& info) { 656 const v8::PropertyCallbackInfo<v8::Value>& info) {
657 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); 657 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
658 HandleScope scope(isolate); 658 HandleScope scope(isolate);
659 Handle<Object> object = Utils::OpenHandle(*info.This()); 659 Handle<Object> object = Utils::OpenHandle(*info.This());
660 Handle<Script> script( 660 Handle<Script> script(
661 Script::cast(Handle<JSValue>::cast(object)->value()), isolate); 661 Script::cast(Handle<JSValue>::cast(object)->value()), isolate);
662 Handle<Object> result = isolate->factory()->undefined_value(); 662 Handle<Object> result = isolate->factory()->undefined_value();
663 if (script->compilation_type() == Script::COMPILATION_TYPE_EVAL) { 663 if (script->compilation_type() == Script::COMPILATION_TYPE_EVAL) {
664 result = 664 Handle<Code> code(SharedFunctionInfo::cast(
665 Handle<Object>(Smi::FromInt(script->eval_from_position()), isolate); 665 script->eval_from_shared())->code());
666 result = Handle<Object>(Smi::FromInt(code->SourcePosition(
667 script->eval_from_instructions_offset())),
668 isolate);
666 } 669 }
667 info.GetReturnValue().Set(Utils::ToLocal(result)); 670 info.GetReturnValue().Set(Utils::ToLocal(result));
668 } 671 }
669 672
670 673
671 Handle<AccessorInfo> Accessors::ScriptEvalFromScriptPositionInfo( 674 Handle<AccessorInfo> Accessors::ScriptEvalFromScriptPositionInfo(
672 Isolate* isolate, PropertyAttributes attributes) { 675 Isolate* isolate, PropertyAttributes attributes) {
673 Handle<String> name(isolate->factory()->InternalizeOneByteString( 676 Handle<String> name(isolate->factory()->InternalizeOneByteString(
674 STATIC_CHAR_VECTOR("eval_from_script_position"))); 677 STATIC_CHAR_VECTOR("eval_from_script_position")));
675 return MakeAccessor(isolate, name, &ScriptEvalFromScriptPositionGetter, 678 return MakeAccessor(isolate, name, &ScriptEvalFromScriptPositionGetter,
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 Isolate* isolate = name->GetIsolate(); 1206 Isolate* isolate = name->GetIsolate();
1204 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, 1207 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport,
1205 &ModuleSetExport, attributes); 1208 &ModuleSetExport, attributes);
1206 info->set_data(Smi::FromInt(index)); 1209 info->set_data(Smi::FromInt(index));
1207 return info; 1210 return info;
1208 } 1211 }
1209 1212
1210 1213
1211 } // namespace internal 1214 } // namespace internal
1212 } // namespace v8 1215 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698