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

Side by Side Diff: src/accessors.cc

Issue 22831010: Move enum CompilationType from objects.h to include/v8.h, (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 4 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
« include/v8.h ('K') | « include/v8.h ('k') | src/compiler.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 // Accessors::ScriptGetEvalFromScriptPosition 381 // Accessors::ScriptGetEvalFromScriptPosition
382 // 382 //
383 383
384 384
385 MaybeObject* Accessors::ScriptGetEvalFromScriptPosition(Object* object, void*) { 385 MaybeObject* Accessors::ScriptGetEvalFromScriptPosition(Object* object, void*) {
386 Script* raw_script = Script::cast(JSValue::cast(object)->value()); 386 Script* raw_script = Script::cast(JSValue::cast(object)->value());
387 HandleScope scope(raw_script->GetIsolate()); 387 HandleScope scope(raw_script->GetIsolate());
388 Handle<Script> script(raw_script); 388 Handle<Script> script(raw_script);
389 389
390 // If this is not a script compiled through eval there is no eval position. 390 // If this is not a script compiled through eval there is no eval position.
391 if (script->compilation_type() != Script::COMPILATION_TYPE_EVAL) { 391 if (script->compilation_type() != v8::Script::COMPILATION_TYPE_EVAL) {
392 return script->GetHeap()->undefined_value(); 392 return script->GetHeap()->undefined_value();
393 } 393 }
394 394
395 // Get the function from where eval was called and find the source position 395 // Get the function from where eval was called and find the source position
396 // from the instruction offset. 396 // from the instruction offset.
397 Handle<Code> code(SharedFunctionInfo::cast( 397 Handle<Code> code(SharedFunctionInfo::cast(
398 script->eval_from_shared())->code()); 398 script->eval_from_shared())->code());
399 return Smi::FromInt(code->SourcePosition(code->instruction_start() + 399 return Smi::FromInt(code->SourcePosition(code->instruction_start() +
400 script->eval_from_instructions_offset()->value())); 400 script->eval_from_instructions_offset()->value()));
401 } 401 }
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 info->set_data(Smi::FromInt(index)); 848 info->set_data(Smi::FromInt(index));
849 Handle<Object> getter = v8::FromCData(&ModuleGetExport); 849 Handle<Object> getter = v8::FromCData(&ModuleGetExport);
850 Handle<Object> setter = v8::FromCData(&ModuleSetExport); 850 Handle<Object> setter = v8::FromCData(&ModuleSetExport);
851 info->set_getter(*getter); 851 info->set_getter(*getter);
852 if (!(attributes & ReadOnly)) info->set_setter(*setter); 852 if (!(attributes & ReadOnly)) info->set_setter(*setter);
853 return info; 853 return info;
854 } 854 }
855 855
856 856
857 } } // namespace v8::internal 857 } } // namespace v8::internal
OLDNEW
« include/v8.h ('K') | « include/v8.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698