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

Side by Side Diff: src/compiler.cc

Issue 6794019: Simplify isolates access during stack iteration (WAS: Move SafeStackFrameIterator::active_count_...) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A couple more changes Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 Handle<Script> script = info->script(); 360 Handle<Script> script = info->script();
361 script->set_context_data((*isolate->global_context())->data()); 361 script->set_context_data((*isolate->global_context())->data());
362 362
363 #ifdef ENABLE_DEBUGGER_SUPPORT 363 #ifdef ENABLE_DEBUGGER_SUPPORT
364 if (info->is_eval()) { 364 if (info->is_eval()) {
365 Script::CompilationType compilation_type = Script::COMPILATION_TYPE_EVAL; 365 Script::CompilationType compilation_type = Script::COMPILATION_TYPE_EVAL;
366 script->set_compilation_type(Smi::FromInt(compilation_type)); 366 script->set_compilation_type(Smi::FromInt(compilation_type));
367 // For eval scripts add information on the function from which eval was 367 // For eval scripts add information on the function from which eval was
368 // called. 368 // called.
369 if (info->is_eval()) { 369 if (info->is_eval()) {
370 StackTraceFrameIterator it; 370 StackTraceFrameIterator it(isolate);
371 if (!it.done()) { 371 if (!it.done()) {
372 script->set_eval_from_shared( 372 script->set_eval_from_shared(
373 JSFunction::cast(it.frame()->function())->shared()); 373 JSFunction::cast(it.frame()->function())->shared());
374 Code* code = it.frame()->LookupCode(isolate); 374 Code* code = it.frame()->LookupCode();
375 int offset = static_cast<int>( 375 int offset = static_cast<int>(
376 it.frame()->pc() - code->instruction_start()); 376 it.frame()->pc() - code->instruction_start());
377 script->set_eval_from_instructions_offset(Smi::FromInt(offset)); 377 script->set_eval_from_instructions_offset(Smi::FromInt(offset));
378 } 378 }
379 } 379 }
380 } 380 }
381 381
382 // Notify debugger 382 // Notify debugger
383 isolate->debugger()->OnBeforeCompile(script); 383 isolate->debugger()->OnBeforeCompile(script);
384 #endif 384 #endif
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 shared->DebugName())); 783 shared->DebugName()));
784 } 784 }
785 } 785 }
786 786
787 GDBJIT(AddCode(name, 787 GDBJIT(AddCode(name,
788 Handle<Script>(info->script()), 788 Handle<Script>(info->script()),
789 Handle<Code>(info->code()))); 789 Handle<Code>(info->code())));
790 } 790 }
791 791
792 } } // namespace v8::internal 792 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/cpu-profiler.cc » ('j') | src/frames.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698