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

Side by Side Diff: src/full-codegen.cc

Issue 690713003: Assert that unoptimized code does not embed context-specific objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: do not allow objects from builtins context Created 6 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 | « no previous file | src/objects.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 code->set_has_deoptimization_support(info->HasDeoptimizationSupport()); 339 code->set_has_deoptimization_support(info->HasDeoptimizationSupport());
340 code->set_handler_table(*cgen.handler_table()); 340 code->set_handler_table(*cgen.handler_table());
341 code->set_compiled_optimizable(info->IsOptimizable()); 341 code->set_compiled_optimizable(info->IsOptimizable());
342 code->set_allow_osr_at_loop_nesting_level(0); 342 code->set_allow_osr_at_loop_nesting_level(0);
343 code->set_profiler_ticks(0); 343 code->set_profiler_ticks(0);
344 code->set_back_edge_table_offset(table_offset); 344 code->set_back_edge_table_offset(table_offset);
345 CodeGenerator::PrintCode(code, info); 345 CodeGenerator::PrintCode(code, info);
346 info->SetCode(code); 346 info->SetCode(code);
347 void* line_info = masm.positions_recorder()->DetachJITHandlerData(); 347 void* line_info = masm.positions_recorder()->DetachJITHandlerData();
348 LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info)); 348 LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info));
349
350 #ifdef DEBUG
351 // Check that no context-specific object has been embedded.
352 code->VerifyEmbeddedObjectsInFullCode();
353 #endif // DEBUG
349 return true; 354 return true;
350 } 355 }
351 356
352 357
353 unsigned FullCodeGenerator::EmitBackEdgeTable() { 358 unsigned FullCodeGenerator::EmitBackEdgeTable() {
354 // The back edge table consists of a length (in number of entries) 359 // The back edge table consists of a length (in number of entries)
355 // field, and then a sequence of entries. Each entry is a pair of AST id 360 // field, and then a sequence of entries. Each entry is a pair of AST id
356 // and code-relative pc offset. 361 // and code-relative pc offset.
357 masm()->Align(kPointerSize); 362 masm()->Align(kPointerSize);
358 unsigned offset = masm()->pc_offset(); 363 unsigned offset = masm()->pc_offset();
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 } 1751 }
1747 return true; 1752 return true;
1748 } 1753 }
1749 #endif // DEBUG 1754 #endif // DEBUG
1750 1755
1751 1756
1752 #undef __ 1757 #undef __
1753 1758
1754 1759
1755 } } // namespace v8::internal 1760 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698