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

Side by Side Diff: src/codegen.cc

Issue 2861017: [Isolates] Make statics from BootstrapperActive to be instance members (Closed)
Patch Set: Created 10 years, 6 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 | « src/bootstrapper.cc ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 115
116 void CodeGenerator::MakeCodePrologue(CompilationInfo* info) { 116 void CodeGenerator::MakeCodePrologue(CompilationInfo* info) {
117 #ifdef DEBUG 117 #ifdef DEBUG
118 bool print_source = false; 118 bool print_source = false;
119 bool print_ast = false; 119 bool print_ast = false;
120 bool print_json_ast = false; 120 bool print_json_ast = false;
121 const char* ftype; 121 const char* ftype;
122 122
123 if (Bootstrapper::IsActive()) { 123 if (Isolate::Current()->bootstrapper()->IsActive()) {
124 print_source = FLAG_print_builtin_source; 124 print_source = FLAG_print_builtin_source;
125 print_ast = FLAG_print_builtin_ast; 125 print_ast = FLAG_print_builtin_ast;
126 print_json_ast = FLAG_print_builtin_json_ast; 126 print_json_ast = FLAG_print_builtin_json_ast;
127 ftype = "builtin"; 127 ftype = "builtin";
128 } else { 128 } else {
129 print_source = FLAG_print_source; 129 print_source = FLAG_print_source;
130 print_ast = FLAG_print_ast; 130 print_ast = FLAG_print_ast;
131 print_json_ast = FLAG_print_json_ast; 131 print_json_ast = FLAG_print_json_ast;
132 ftype = "user-defined"; 132 ftype = "user-defined";
133 } 133 }
(...skipping 26 matching lines...) Expand all
160 Code::Flags flags, 160 Code::Flags flags,
161 CompilationInfo* info) { 161 CompilationInfo* info) {
162 // Allocate and install the code. 162 // Allocate and install the code.
163 CodeDesc desc; 163 CodeDesc desc;
164 masm->GetCode(&desc); 164 masm->GetCode(&desc);
165 ZoneScopeInfo sinfo(info->scope()); 165 ZoneScopeInfo sinfo(info->scope());
166 Handle<Code> code = 166 Handle<Code> code =
167 Factory::NewCode(desc, &sinfo, flags, masm->CodeObject()); 167 Factory::NewCode(desc, &sinfo, flags, masm->CodeObject());
168 168
169 #ifdef ENABLE_DISASSEMBLER 169 #ifdef ENABLE_DISASSEMBLER
170 bool print_code = Bootstrapper::IsActive() 170 bool print_code = Isolate::Current()->bootstrapper()->IsActive()
171 ? FLAG_print_builtin_code 171 ? FLAG_print_builtin_code
172 : FLAG_print_code; 172 : FLAG_print_code;
173 if (print_code) { 173 if (print_code) {
174 // Print the source code if available. 174 // Print the source code if available.
175 Handle<Script> script = info->script(); 175 Handle<Script> script = info->script();
176 FunctionLiteral* function = info->function(); 176 FunctionLiteral* function = info->function();
177 if (!script->IsUndefined() && !script->source()->IsUndefined()) { 177 if (!script->IsUndefined() && !script->source()->IsUndefined()) {
178 PrintF("--- Raw source ---\n"); 178 PrintF("--- Raw source ---\n");
179 StringInputBuffer stream(String::cast(script->source())); 179 StringInputBuffer stream(String::cast(script->source()));
180 stream.Seek(function->start_position()); 180 stream.Seek(function->start_position());
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 } 508 }
509 } 509 }
510 510
511 511
512 void ApiGetterEntryStub::SetCustomCache(Code* value) { 512 void ApiGetterEntryStub::SetCustomCache(Code* value) {
513 info()->set_load_stub_cache(value); 513 info()->set_load_stub_cache(value);
514 } 514 }
515 515
516 516
517 } } // namespace v8::internal 517 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698