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

Side by Side Diff: src/compiler.cc

Issue 11190050: Heavy cleanup of the external pointer API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 1 month 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 | « src/bootstrapper.cc ('k') | src/contexts.h » ('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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 #endif 425 #endif
426 426
427 427
428 static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) { 428 static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
429 Isolate* isolate = info->isolate(); 429 Isolate* isolate = info->isolate();
430 ZoneScope zone_scope(info->zone(), DELETE_ON_EXIT); 430 ZoneScope zone_scope(info->zone(), DELETE_ON_EXIT);
431 PostponeInterruptsScope postpone(isolate); 431 PostponeInterruptsScope postpone(isolate);
432 432
433 ASSERT(!isolate->native_context().is_null()); 433 ASSERT(!isolate->native_context().is_null());
434 Handle<Script> script = info->script(); 434 Handle<Script> script = info->script();
435 script->set_context_data((*isolate->native_context())->data()); 435 // TODO(svenpanne) Obscure place for this, perhaps move to OnBeforeCompile?
436 FixedArray* array = isolate->native_context()->embedder_data();
437 script->set_context_data(array->get(0));
436 438
437 #ifdef ENABLE_DEBUGGER_SUPPORT 439 #ifdef ENABLE_DEBUGGER_SUPPORT
438 if (info->is_eval()) { 440 if (info->is_eval()) {
439 Script::CompilationType compilation_type = Script::COMPILATION_TYPE_EVAL; 441 Script::CompilationType compilation_type = Script::COMPILATION_TYPE_EVAL;
440 script->set_compilation_type(Smi::FromInt(compilation_type)); 442 script->set_compilation_type(Smi::FromInt(compilation_type));
441 // For eval scripts add information on the function from which eval was 443 // For eval scripts add information on the function from which eval was
442 // called. 444 // called.
443 if (info->is_eval()) { 445 if (info->is_eval()) {
444 StackTraceFrameIterator it(isolate); 446 StackTraceFrameIterator it(isolate);
445 if (!it.done()) { 447 if (!it.done()) {
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 } 1049 }
1048 } 1050 }
1049 1051
1050 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1052 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1051 Handle<Script>(info->script()), 1053 Handle<Script>(info->script()),
1052 Handle<Code>(info->code()), 1054 Handle<Code>(info->code()),
1053 info)); 1055 info));
1054 } 1056 }
1055 1057
1056 } } // namespace v8::internal 1058 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698