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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/disassembler.cc ('k') | src/isolate.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 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 bool LCodeGen::GenerateJumpTable() { 377 bool LCodeGen::GenerateJumpTable() {
378 Label needs_frame_not_call; 378 Label needs_frame_not_call;
379 Label needs_frame_is_call; 379 Label needs_frame_is_call;
380 for (int i = 0; i < jump_table_.length(); i++) { 380 for (int i = 0; i < jump_table_.length(); i++) {
381 __ bind(&jump_table_[i].label); 381 __ bind(&jump_table_[i].label);
382 Address entry = jump_table_[i].address; 382 Address entry = jump_table_[i].address;
383 bool is_lazy_deopt = jump_table_[i].is_lazy_deopt; 383 bool is_lazy_deopt = jump_table_[i].is_lazy_deopt;
384 Deoptimizer::BailoutType type = 384 Deoptimizer::BailoutType type =
385 is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER; 385 is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER;
386 int id = Deoptimizer::GetDeoptimizationId(entry, type); 386 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
387 if (id == Deoptimizer::kNotDeoptimizationEntry) { 387 if (id == Deoptimizer::kNotDeoptimizationEntry) {
388 Comment(";;; jump table entry %d.", i); 388 Comment(";;; jump table entry %d.", i);
389 } else { 389 } else {
390 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id); 390 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
391 } 391 }
392 if (jump_table_[i].needs_frame) { 392 if (jump_table_[i].needs_frame) {
393 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); 393 __ push(Immediate(ExternalReference::ForDeoptEntry(entry)));
394 if (is_lazy_deopt) { 394 if (is_lazy_deopt) {
395 if (needs_frame_is_call.is_bound()) { 395 if (needs_frame_is_call.is_bound()) {
396 __ jmp(&needs_frame_is_call); 396 __ jmp(&needs_frame_is_call);
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 } 946 }
947 } 947 }
948 948
949 949
950 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { 950 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
951 int length = deoptimizations_.length(); 951 int length = deoptimizations_.length();
952 if (length == 0) return; 952 if (length == 0) return;
953 Handle<DeoptimizationInputData> data = 953 Handle<DeoptimizationInputData> data =
954 factory()->NewDeoptimizationInputData(length, TENURED); 954 factory()->NewDeoptimizationInputData(length, TENURED);
955 955
956 Handle<ByteArray> translations = translations_.CreateByteArray(); 956 Handle<ByteArray> translations =
957 translations_.CreateByteArray(isolate()->factory());
957 data->SetTranslationByteArray(*translations); 958 data->SetTranslationByteArray(*translations);
958 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 959 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
959 960
960 Handle<FixedArray> literals = 961 Handle<FixedArray> literals =
961 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 962 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
962 for (int i = 0; i < deoptimization_literals_.length(); i++) { 963 for (int i = 0; i < deoptimization_literals_.length(); i++) {
963 literals->set(i, *deoptimization_literals_[i]); 964 literals->set(i, *deoptimization_literals_[i]);
964 } 965 }
965 data->SetLiteralArray(*literals); 966 data->SetLiteralArray(*literals);
966 967
(...skipping 5326 matching lines...) Expand 10 before | Expand all | Expand 10 after
6293 FixedArray::kHeaderSize - kPointerSize)); 6294 FixedArray::kHeaderSize - kPointerSize));
6294 __ bind(&done); 6295 __ bind(&done);
6295 } 6296 }
6296 6297
6297 6298
6298 #undef __ 6299 #undef __
6299 6300
6300 } } // namespace v8::internal 6301 } } // namespace v8::internal
6301 6302
6302 #endif // V8_TARGET_ARCH_IA32 6303 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/disassembler.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698