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

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

Issue 6359015: Revert "Unification: introduce ExternalReference::pending_exception_address()." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 11 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/ia32/code-stubs-ia32.cc ('k') | src/top.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 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 1171
1172 // Special handling of out of memory exceptions. 1172 // Special handling of out of memory exceptions.
1173 Failure* out_of_memory = Failure::OutOfMemoryException(); 1173 Failure* out_of_memory = Failure::OutOfMemoryException();
1174 __ Branch(eq, throw_out_of_memory_exception, 1174 __ Branch(eq, throw_out_of_memory_exception,
1175 v0, Operand(reinterpret_cast<int32_t>(out_of_memory))); 1175 v0, Operand(reinterpret_cast<int32_t>(out_of_memory)));
1176 1176
1177 // Retrieve the pending exception and clear the variable. 1177 // Retrieve the pending exception and clear the variable.
1178 __ LoadExternalReference(t0, ExternalReference::the_hole_value_location()); 1178 __ LoadExternalReference(t0, ExternalReference::the_hole_value_location());
1179 __ lw(a3, MemOperand(t0)); 1179 __ lw(a3, MemOperand(t0));
1180 __ LoadExternalReference(t0, 1180 __ LoadExternalReference(t0,
1181 ExternalReference::pending_exception_address()); 1181 ExternalReference(Top::k_pending_exception_address));
1182 __ lw(v0, MemOperand(t0)); 1182 __ lw(v0, MemOperand(t0));
1183 __ sw(a3, MemOperand(t0)); 1183 __ sw(a3, MemOperand(t0));
1184 1184
1185 // Special handling of termination exceptions which are uncatchable 1185 // Special handling of termination exceptions which are uncatchable
1186 // by javascript code. 1186 // by javascript code.
1187 __ Branch(eq, throw_termination_exception, 1187 __ Branch(eq, throw_termination_exception,
1188 v0, Operand(Factory::termination_exception())); 1188 v0, Operand(Factory::termination_exception()));
1189 1189
1190 // Handle normal exception. 1190 // Handle normal exception.
1191 __ b(throw_normal_exception); 1191 __ b(throw_normal_exception);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 1304
1305 // Call a faked try-block that does the invoke. 1305 // Call a faked try-block that does the invoke.
1306 __ bal(&invoke); 1306 __ bal(&invoke);
1307 __ nop(); // Branch delay slot nop. 1307 __ nop(); // Branch delay slot nop.
1308 1308
1309 // Caught exception: Store result (exception) in the pending 1309 // Caught exception: Store result (exception) in the pending
1310 // exception field in the JSEnv and return a failure sentinel. 1310 // exception field in the JSEnv and return a failure sentinel.
1311 // Coming in here the fp will be invalid because the PushTryHandler below 1311 // Coming in here the fp will be invalid because the PushTryHandler below
1312 // sets it to 0 to signal the existence of the JSEntry frame. 1312 // sets it to 0 to signal the existence of the JSEntry frame.
1313 __ LoadExternalReference(t0, 1313 __ LoadExternalReference(t0,
1314 ExternalReference::pending_exception_address()); 1314 ExternalReference(Top::k_pending_exception_address));
1315 __ sw(v0, MemOperand(t0)); // We come back from 'invoke'. result is in v0. 1315 __ sw(v0, MemOperand(t0)); // We come back from 'invoke'. result is in v0.
1316 __ li(v0, Operand(reinterpret_cast<int32_t>(Failure::Exception()))); 1316 __ li(v0, Operand(reinterpret_cast<int32_t>(Failure::Exception())));
1317 __ b(&exit); 1317 __ b(&exit);
1318 __ nop(); // Branch delay slot nop. 1318 __ nop(); // Branch delay slot nop.
1319 1319
1320 // Invoke: Link this frame into the handler chain. 1320 // Invoke: Link this frame into the handler chain.
1321 __ bind(&invoke); 1321 __ bind(&invoke);
1322 __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER); 1322 __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER);
1323 // If an exception not caught by another handler occurs, this handler 1323 // If an exception not caught by another handler occurs, this handler
1324 // returns control to the code after the bal(&invoke) above, which 1324 // returns control to the code after the bal(&invoke) above, which
1325 // restores all kCalleeSaved registers (including cp and fp) to their 1325 // restores all kCalleeSaved registers (including cp and fp) to their
1326 // saved values before returning a failure to C. 1326 // saved values before returning a failure to C.
1327 1327
1328 // Clear any pending exceptions. 1328 // Clear any pending exceptions.
1329 __ LoadExternalReference(t0, ExternalReference::the_hole_value_location()); 1329 __ LoadExternalReference(t0, ExternalReference::the_hole_value_location());
1330 __ lw(t1, MemOperand(t0)); 1330 __ lw(t1, MemOperand(t0));
1331 __ LoadExternalReference(t0, 1331 __ LoadExternalReference(t0,
1332 ExternalReference::pending_exception_address()); 1332 ExternalReference(Top::k_pending_exception_address));
1333 __ sw(t1, MemOperand(t0)); 1333 __ sw(t1, MemOperand(t0));
1334 1334
1335 // Invoke the function by calling through JS entry trampoline builtin. 1335 // Invoke the function by calling through JS entry trampoline builtin.
1336 // Notice that we cannot store a reference to the trampoline code directly in 1336 // Notice that we cannot store a reference to the trampoline code directly in
1337 // this stub, because runtime stubs are not traversed when doing GC. 1337 // this stub, because runtime stubs are not traversed when doing GC.
1338 1338
1339 // Registers: 1339 // Registers:
1340 // a0: entry_address 1340 // a0: entry_address
1341 // a1: function 1341 // a1: function
1342 // a2: reveiver_pointer 1342 // a2: reveiver_pointer
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); 1428 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15));
1429 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); 1429 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0);
1430 } 1430 }
1431 1431
1432 1432
1433 #undef __ 1433 #undef __
1434 1434
1435 } } // namespace v8::internal 1435 } } // namespace v8::internal
1436 1436
1437 #endif // V8_TARGET_ARCH_MIPS 1437 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/top.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698