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

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

Issue 1150293002: Do not leak message object beyond try-catch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: platform ports and turbofan Created 5 years, 7 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
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 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5245 matching lines...) Expand 10 before | Expand all | Expand 10 after
5256 __ pop(result_register()); 5256 __ pop(result_register());
5257 5257
5258 // Uncook return address. 5258 // Uncook return address.
5259 __ pop(edx); 5259 __ pop(edx);
5260 __ SmiUntag(edx); 5260 __ SmiUntag(edx);
5261 __ add(edx, Immediate(masm_->CodeObject())); 5261 __ add(edx, Immediate(masm_->CodeObject()));
5262 __ jmp(edx); 5262 __ jmp(edx);
5263 } 5263 }
5264 5264
5265 5265
5266 void FullCodeGenerator::EnterCatchBlock() {
5267 DCHECK(!result_register().is(edx));
5268 ExternalReference pending_message_obj =
5269 ExternalReference::address_of_pending_message_obj(isolate());
5270 __ mov(edx, Immediate(isolate()->factory()->the_hole_value()));
5271 __ mov(Operand::StaticVariable(pending_message_obj), edx);
5272 }
5273
5274
5266 #undef __ 5275 #undef __
5267 5276
5268 5277
5269 static const byte kJnsInstruction = 0x79; 5278 static const byte kJnsInstruction = 0x79;
5270 static const byte kJnsOffset = 0x11; 5279 static const byte kJnsOffset = 0x11;
5271 static const byte kNopByteOne = 0x66; 5280 static const byte kNopByteOne = 0x66;
5272 static const byte kNopByteTwo = 0x90; 5281 static const byte kNopByteTwo = 0x90;
5273 #ifdef DEBUG 5282 #ifdef DEBUG
5274 static const byte kCallInstruction = 0xe8; 5283 static const byte kCallInstruction = 0xe8;
5275 #endif 5284 #endif
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5339 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5348 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5340 Assembler::target_address_at(call_target_address, 5349 Assembler::target_address_at(call_target_address,
5341 unoptimized_code)); 5350 unoptimized_code));
5342 return OSR_AFTER_STACK_CHECK; 5351 return OSR_AFTER_STACK_CHECK;
5343 } 5352 }
5344 5353
5345 5354
5346 } } // namespace v8::internal 5355 } } // namespace v8::internal
5347 5356
5348 #endif // V8_TARGET_ARCH_X87 5357 #endif // V8_TARGET_ARCH_X87
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698