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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 12917002: Pass Isolates explicitly in Deoptimizer-related code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleanup Created 7 years, 9 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/api.cc ('k') | src/assembler.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 // 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 Label table_start; 358 Label table_start;
359 __ bind(&table_start); 359 __ bind(&table_start);
360 Label needs_frame_not_call; 360 Label needs_frame_not_call;
361 Label needs_frame_is_call; 361 Label needs_frame_is_call;
362 for (int i = 0; i < deopt_jump_table_.length(); i++) { 362 for (int i = 0; i < deopt_jump_table_.length(); i++) {
363 __ bind(&deopt_jump_table_[i].label); 363 __ bind(&deopt_jump_table_[i].label);
364 Address entry = deopt_jump_table_[i].address; 364 Address entry = deopt_jump_table_[i].address;
365 bool is_lazy_deopt = deopt_jump_table_[i].is_lazy_deopt; 365 bool is_lazy_deopt = deopt_jump_table_[i].is_lazy_deopt;
366 Deoptimizer::BailoutType type = 366 Deoptimizer::BailoutType type =
367 is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER; 367 is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER;
368 int id = Deoptimizer::GetDeoptimizationId(entry, type); 368 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
369 if (id == Deoptimizer::kNotDeoptimizationEntry) { 369 if (id == Deoptimizer::kNotDeoptimizationEntry) {
370 Comment(";;; jump table entry %d.", i); 370 Comment(";;; jump table entry %d.", i);
371 } else { 371 } else {
372 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id); 372 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
373 } 373 }
374 if (deopt_jump_table_[i].needs_frame) { 374 if (deopt_jump_table_[i].needs_frame) {
375 __ mov(ip, Operand(ExternalReference::ForDeoptEntry(entry))); 375 __ mov(ip, Operand(ExternalReference::ForDeoptEntry(entry)));
376 if (is_lazy_deopt) { 376 if (is_lazy_deopt) {
377 if (needs_frame_is_call.is_bound()) { 377 if (needs_frame_is_call.is_bound()) {
378 __ b(&needs_frame_is_call); 378 __ b(&needs_frame_is_call);
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 } 908 }
909 } 909 }
910 910
911 911
912 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { 912 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
913 int length = deoptimizations_.length(); 913 int length = deoptimizations_.length();
914 if (length == 0) return; 914 if (length == 0) return;
915 Handle<DeoptimizationInputData> data = 915 Handle<DeoptimizationInputData> data =
916 factory()->NewDeoptimizationInputData(length, TENURED); 916 factory()->NewDeoptimizationInputData(length, TENURED);
917 917
918 Handle<ByteArray> translations = translations_.CreateByteArray(); 918 Handle<ByteArray> translations =
919 translations_.CreateByteArray(isolate()->factory());
919 data->SetTranslationByteArray(*translations); 920 data->SetTranslationByteArray(*translations);
920 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 921 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
921 922
922 Handle<FixedArray> literals = 923 Handle<FixedArray> literals =
923 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 924 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
924 for (int i = 0; i < deoptimization_literals_.length(); i++) { 925 for (int i = 0; i < deoptimization_literals_.length(); i++) {
925 literals->set(i, *deoptimization_literals_[i]); 926 literals->set(i, *deoptimization_literals_[i]);
926 } 927 }
927 data->SetLiteralArray(*literals); 928 data->SetLiteralArray(*literals);
928 929
(...skipping 5463 matching lines...) Expand 10 before | Expand all | Expand 10 after
6392 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 6393 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
6393 __ ldr(result, FieldMemOperand(scratch, 6394 __ ldr(result, FieldMemOperand(scratch,
6394 FixedArray::kHeaderSize - kPointerSize)); 6395 FixedArray::kHeaderSize - kPointerSize));
6395 __ bind(&done); 6396 __ bind(&done);
6396 } 6397 }
6397 6398
6398 6399
6399 #undef __ 6400 #undef __
6400 6401
6401 } } // namespace v8::internal 6402 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698