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

Side by Side Diff: src/compiler.cc

Issue 4070003: [Isolates] Convert more static data either to read-only or to per-isolate. (Closed)
Patch Set: Created 10 years, 2 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/codegen.cc ('k') | src/debug.cc » ('j') | src/frames.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 ? Script::COMPILATION_TYPE_JSON 162 ? Script::COMPILATION_TYPE_JSON
163 : Script::COMPILATION_TYPE_EVAL; 163 : Script::COMPILATION_TYPE_EVAL;
164 script->set_compilation_type(Smi::FromInt(compilation_type)); 164 script->set_compilation_type(Smi::FromInt(compilation_type));
165 // For eval scripts add information on the function from which eval was 165 // For eval scripts add information on the function from which eval was
166 // called. 166 // called.
167 if (info->is_eval()) { 167 if (info->is_eval()) {
168 StackTraceFrameIterator it; 168 StackTraceFrameIterator it;
169 if (!it.done()) { 169 if (!it.done()) {
170 script->set_eval_from_shared( 170 script->set_eval_from_shared(
171 JSFunction::cast(it.frame()->function())->shared()); 171 JSFunction::cast(it.frame()->function())->shared());
172 Code* code = it.frame()->LookupCode(isolate);
172 int offset = static_cast<int>( 173 int offset = static_cast<int>(
173 it.frame()->pc() - it.frame()->code()->instruction_start()); 174 it.frame()->pc() - code->instruction_start());
174 script->set_eval_from_instructions_offset(Smi::FromInt(offset)); 175 script->set_eval_from_instructions_offset(Smi::FromInt(offset));
175 } 176 }
176 } 177 }
177 } 178 }
178 179
179 // Notify debugger 180 // Notify debugger
180 isolate->debugger()->OnBeforeCompile(script); 181 isolate->debugger()->OnBeforeCompile(script);
181 #endif 182 #endif
182 183
183 // Only allow non-global compiles for eval. 184 // Only allow non-global compiles for eval.
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 *code, 580 *code,
580 *name)); 581 *name));
581 OPROFILE(CreateNativeCodeRegion(*name, 582 OPROFILE(CreateNativeCodeRegion(*name,
582 code->instruction_start(), 583 code->instruction_start(),
583 code->instruction_size())); 584 code->instruction_size()));
584 } 585 }
585 } 586 }
586 } 587 }
587 588
588 } } // namespace v8::internal 589 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/debug.cc » ('j') | src/frames.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698