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

Side by Side Diff: src/accessors.cc

Issue 237673014: Move functions from handles.cc to where they belong. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebox Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/allocation-tracker.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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // Accessors::ScriptGetLineEnds 435 // Accessors::ScriptGetLineEnds
436 // 436 //
437 437
438 438
439 MaybeObject* Accessors::ScriptGetLineEnds(Isolate* isolate, 439 MaybeObject* Accessors::ScriptGetLineEnds(Isolate* isolate,
440 Object* object, 440 Object* object,
441 void*) { 441 void*) {
442 JSValue* wrapper = JSValue::cast(object); 442 JSValue* wrapper = JSValue::cast(object);
443 HandleScope scope(isolate); 443 HandleScope scope(isolate);
444 Handle<Script> script(Script::cast(wrapper->value()), isolate); 444 Handle<Script> script(Script::cast(wrapper->value()), isolate);
445 InitScriptLineEnds(script); 445 Script::InitLineEnds(script);
446 ASSERT(script->line_ends()->IsFixedArray()); 446 ASSERT(script->line_ends()->IsFixedArray());
447 Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends())); 447 Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends()));
448 // We do not want anyone to modify this array from JS. 448 // We do not want anyone to modify this array from JS.
449 ASSERT(*line_ends == isolate->heap()->empty_fixed_array() || 449 ASSERT(*line_ends == isolate->heap()->empty_fixed_array() ||
450 line_ends->map() == isolate->heap()->fixed_cow_array_map()); 450 line_ends->map() == isolate->heap()->fixed_cow_array_map());
451 Handle<JSArray> js_array = 451 Handle<JSArray> js_array =
452 isolate->factory()->NewJSArrayWithElements(line_ends); 452 isolate->factory()->NewJSArrayWithElements(line_ends);
453 return *js_array; 453 return *js_array;
454 } 454 }
455 455
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 MaybeObject* Accessors::ScriptGetEvalFromScript(Isolate* isolate, 489 MaybeObject* Accessors::ScriptGetEvalFromScript(Isolate* isolate,
490 Object* object, 490 Object* object,
491 void*) { 491 void*) {
492 Object* script = JSValue::cast(object)->value(); 492 Object* script = JSValue::cast(object)->value();
493 if (!Script::cast(script)->eval_from_shared()->IsUndefined()) { 493 if (!Script::cast(script)->eval_from_shared()->IsUndefined()) {
494 Handle<SharedFunctionInfo> eval_from_shared( 494 Handle<SharedFunctionInfo> eval_from_shared(
495 SharedFunctionInfo::cast(Script::cast(script)->eval_from_shared())); 495 SharedFunctionInfo::cast(Script::cast(script)->eval_from_shared()));
496 496
497 if (eval_from_shared->script()->IsScript()) { 497 if (eval_from_shared->script()->IsScript()) {
498 Handle<Script> eval_from_script(Script::cast(eval_from_shared->script())); 498 Handle<Script> eval_from_script(Script::cast(eval_from_shared->script()));
499 return *GetScriptWrapper(eval_from_script); 499 return *Script::GetWrapper(eval_from_script);
500 } 500 }
501 } 501 }
502 return isolate->heap()->undefined_value(); 502 return isolate->heap()->undefined_value();
503 } 503 }
504 504
505 505
506 const AccessorDescriptor Accessors::ScriptEvalFromScript = { 506 const AccessorDescriptor Accessors::ScriptEvalFromScript = {
507 ScriptGetEvalFromScript, 507 ScriptGetEvalFromScript,
508 IllegalSetter, 508 IllegalSetter,
509 0 509 0
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 info->set_data(Smi::FromInt(index)); 1008 info->set_data(Smi::FromInt(index));
1009 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1009 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1010 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1010 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1011 info->set_getter(*getter); 1011 info->set_getter(*getter);
1012 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1012 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1013 return info; 1013 return info;
1014 } 1014 }
1015 1015
1016 1016
1017 } } // namespace v8::internal 1017 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/allocation-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698