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

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

Issue 6599002: Detect overflow of contant pool in virtual frame compiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: set untagged int32 Created 9 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/frame-element.h ('k') | src/ia32/virtual-frame-ia32.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 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 5342 matching lines...) Expand 10 before | Expand all | Expand 10 after
5353 ASSERT(var->is_global()); 5353 ASSERT(var->is_global());
5354 ASSERT(!in_safe_int32_mode()); 5354 ASSERT(!in_safe_int32_mode());
5355 Reference ref(this, node); 5355 Reference ref(this, node);
5356 ref.GetValue(); 5356 ref.GetValue();
5357 } 5357 }
5358 } 5358 }
5359 5359
5360 5360
5361 void CodeGenerator::VisitLiteral(Literal* node) { 5361 void CodeGenerator::VisitLiteral(Literal* node) {
5362 Comment cmnt(masm_, "[ Literal"); 5362 Comment cmnt(masm_, "[ Literal");
5363 if (in_safe_int32_mode()) { 5363 if (frame_->ConstantPoolOverflowed()) {
5364 frame_->PushUntaggedElement(node->handle()); 5364 Result temp = allocator_->Allocate();
5365 ASSERT(temp.is_valid());
5366 if (in_safe_int32_mode()) {
5367 temp.set_untagged_int32(true);
5368 }
5369 if (node->handle()->IsSmi()) {
Kevin Millikin (Chromium) 2011/02/28 11:58:15 I think MacroAssembler::Set will do the right thin
5370 __ Set(temp.reg(), Immediate(Smi::cast(*node->handle())));
5371 } else {
5372 __ mov(temp.reg(), node->handle());
5373 }
5374 frame_->Push(&temp);
5365 } else { 5375 } else {
5366 frame_->Push(node->handle()); 5376 if (in_safe_int32_mode()) {
5377 frame_->PushUntaggedElement(node->handle());
5378 } else {
5379 frame_->Push(node->handle());
5380 }
5367 } 5381 }
5368 } 5382 }
5369 5383
5370 5384
5371 void CodeGenerator::PushUnsafeSmi(Handle<Object> value) { 5385 void CodeGenerator::PushUnsafeSmi(Handle<Object> value) {
5372 ASSERT(value->IsSmi()); 5386 ASSERT(value->IsSmi());
5373 int bits = reinterpret_cast<int>(*value); 5387 int bits = reinterpret_cast<int>(*value);
5374 __ push(Immediate(bits ^ jit_cookie_)); 5388 __ push(Immediate(bits ^ jit_cookie_));
5375 __ xor_(Operand(esp, 0), Immediate(jit_cookie_)); 5389 __ xor_(Operand(esp, 0), Immediate(jit_cookie_));
5376 } 5390 }
(...skipping 4947 matching lines...) Expand 10 before | Expand all | Expand 10 after
10324 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); 10338 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
10325 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); 10339 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
10326 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); 10340 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress());
10327 } 10341 }
10328 10342
10329 #undef __ 10343 #undef __
10330 10344
10331 } } // namespace v8::internal 10345 } } // namespace v8::internal
10332 10346
10333 #endif // V8_TARGET_ARCH_IA32 10347 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/frame-element.h ('k') | src/ia32/virtual-frame-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698