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

Side by Side Diff: src/compiler.cc

Issue 3446028: Merge r5509, r5512, r5530 to 2.3 branch ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
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 | Annotate | Revision Log
« no previous file with comments | « src/compilation-cache.cc ('k') | src/debug.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 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (!ava.Analyze()) return Handle<Code>::null(); 113 if (!ava.Analyze()) return Handle<Code>::null();
114 return CodeGenerator::MakeCode(info); 114 return CodeGenerator::MakeCode(info);
115 } 115 }
116 116
117 117
118 #ifdef ENABLE_DEBUGGER_SUPPORT 118 #ifdef ENABLE_DEBUGGER_SUPPORT
119 Handle<Code> MakeCodeForLiveEdit(CompilationInfo* info) { 119 Handle<Code> MakeCodeForLiveEdit(CompilationInfo* info) {
120 Handle<Context> context = Handle<Context>::null(); 120 Handle<Context> context = Handle<Context>::null();
121 Handle<Code> code = MakeCode(context, info); 121 Handle<Code> code = MakeCode(context, info);
122 if (!info->shared_info().is_null()) { 122 if (!info->shared_info().is_null()) {
123 info->shared_info()->set_scope_info( 123 Handle<SerializedScopeInfo> scope_info =
124 *SerializedScopeInfo::Create(info->scope())); 124 SerializedScopeInfo::Create(info->scope());
125 info->shared_info()->set_scope_info(*scope_info);
125 } 126 }
126 return code; 127 return code;
127 } 128 }
128 #endif 129 #endif
129 130
130 131
131 static Handle<SharedFunctionInfo> MakeFunctionInfo(bool is_global, 132 static Handle<SharedFunctionInfo> MakeFunctionInfo(bool is_global,
132 bool is_eval, 133 bool is_eval,
133 Compiler::ValidationState validate, 134 Compiler::ValidationState validate,
134 Handle<Script> script, 135 Handle<Script> script,
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 405
405 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, 406 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG,
406 name, 407 name,
407 Handle<String>(shared->inferred_name()), 408 Handle<String>(shared->inferred_name()),
408 start_position, 409 start_position,
409 info->script(), 410 info->script(),
410 code); 411 code);
411 412
412 // Update the shared function info with the compiled code and the scope info. 413 // Update the shared function info with the compiled code and the scope info.
413 // Please note, that the order of the sharedfunction initialization is 414 // Please note, that the order of the sharedfunction initialization is
414 // important since set_scope_info might trigger a GC, causing the ASSERT 415 // important since SerializedScopeInfo::Create might trigger a GC, causing
415 // below to be invalid if the code was flushed. By settting the code 416 // the ASSERT below to be invalid if the code was flushed. By setting the code
416 // object last we avoid this. 417 // object last we avoid this.
417 shared->set_scope_info(*SerializedScopeInfo::Create(info->scope())); 418 Handle<SerializedScopeInfo> scope_info =
419 SerializedScopeInfo::Create(info->scope());
420 shared->set_scope_info(*scope_info);
418 shared->set_code(*code); 421 shared->set_code(*code);
419 422
420 // Set the expected number of properties for instances. 423 // Set the expected number of properties for instances.
421 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); 424 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
422 425
423 // Set the optimication hints after performing lazy compilation, as these are 426 // Set the optimication hints after performing lazy compilation, as these are
424 // not set when the function is set up as a lazily compiled function. 427 // not set when the function is set up as a lazily compiled function.
425 shared->SetThisPropertyAssignmentsInfo( 428 shared->SetThisPropertyAssignmentsInfo(
426 lit->has_only_simple_this_property_assignments(), 429 lit->has_only_simple_this_property_assignments(),
427 *lit->this_property_assignments()); 430 *lit->this_property_assignments());
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), 569 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script),
567 *code, *func_name)); 570 *code, *func_name));
568 OPROFILE(CreateNativeCodeRegion(*func_name, 571 OPROFILE(CreateNativeCodeRegion(*func_name,
569 code->instruction_start(), 572 code->instruction_start(),
570 code->instruction_size())); 573 code->instruction_size()));
571 } 574 }
572 } 575 }
573 } 576 }
574 577
575 } } // namespace v8::internal 578 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compilation-cache.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698