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

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

Issue 131103021: Replace HThrow with HCallRuntime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/hydrogen-instructions.h ('k') | src/ia32/lithium-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 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 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 Register value = ToRegister(instr->value()); 2119 Register value = ToRegister(instr->value());
2120 if (encoding == String::ONE_BYTE_ENCODING) { 2120 if (encoding == String::ONE_BYTE_ENCODING) {
2121 __ mov_b(operand, value); 2121 __ mov_b(operand, value);
2122 } else { 2122 } else {
2123 __ mov_w(operand, value); 2123 __ mov_w(operand, value);
2124 } 2124 }
2125 } 2125 }
2126 } 2126 }
2127 2127
2128 2128
2129 void LCodeGen::DoThrow(LThrow* instr) {
2130 __ push(ToOperand(instr->value()));
2131 ASSERT(ToRegister(instr->context()).is(esi));
2132 CallRuntime(Runtime::kThrow, 1, instr);
2133
2134 if (FLAG_debug_code) {
2135 Comment("Unreachable code.");
2136 __ int3();
2137 }
2138 }
2139
2140
2141 void LCodeGen::DoAddI(LAddI* instr) { 2129 void LCodeGen::DoAddI(LAddI* instr) {
2142 LOperand* left = instr->left(); 2130 LOperand* left = instr->left();
2143 LOperand* right = instr->right(); 2131 LOperand* right = instr->right();
2144 2132
2145 if (LAddI::UseLea(instr->hydrogen()) && !left->Equals(instr->result())) { 2133 if (LAddI::UseLea(instr->hydrogen()) && !left->Equals(instr->result())) {
2146 if (right->IsConstantOperand()) { 2134 if (right->IsConstantOperand()) {
2147 int32_t offset = ToRepresentation(LConstantOperand::cast(right), 2135 int32_t offset = ToRepresentation(LConstantOperand::cast(right),
2148 instr->hydrogen()->representation()); 2136 instr->hydrogen()->representation());
2149 __ lea(ToRegister(instr->result()), MemOperand(ToRegister(left), offset)); 2137 __ lea(ToRegister(instr->result()), MemOperand(ToRegister(left), offset));
2150 } else { 2138 } else {
(...skipping 4168 matching lines...) Expand 10 before | Expand all | Expand 10 after
6319 FixedArray::kHeaderSize - kPointerSize)); 6307 FixedArray::kHeaderSize - kPointerSize));
6320 __ bind(&done); 6308 __ bind(&done);
6321 } 6309 }
6322 6310
6323 6311
6324 #undef __ 6312 #undef __
6325 6313
6326 } } // namespace v8::internal 6314 } } // namespace v8::internal
6327 6315
6328 #endif // V8_TARGET_ARCH_IA32 6316 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698