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

Side by Side Diff: src/arm/simulator-arm.h

Issue 6489001: Change native RegExp call code to properly set C++ structures and (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-x64
Patch Set: Ob-lintfix. Created 9 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/arm/regexp-macro-assembler-arm.cc ('k') | src/code-stubs.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 namespace v8 { 44 namespace v8 {
45 namespace internal { 45 namespace internal {
46 46
47 // When running without a simulator we call the entry directly. 47 // When running without a simulator we call the entry directly.
48 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \ 48 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
49 (entry(p0, p1, p2, p3, p4)) 49 (entry(p0, p1, p2, p3, p4))
50 50
51 // Call the generated regexp code directly. The entry function pointer should 51 // Call the generated regexp code directly. The entry function pointer should
52 // expect seven int/pointer sized arguments and return an int. 52 // expect seven int/pointer sized arguments and return an int.
53 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6) \ 53 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6) \
54 (entry(p0, p1, p2, p3, p4, p5, p6)) 54 (entry(p0, p1, p2, p3, NULL, p4, p5, p6))
55 55
56 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \ 56 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \
57 (reinterpret_cast<TryCatch*>(try_catch_address)) 57 (reinterpret_cast<TryCatch*>(try_catch_address))
58 58
59 // The stack limit beyond which we will throw stack overflow errors in 59 // The stack limit beyond which we will throw stack overflow errors in
60 // generated code. Because generated code on arm uses the C stack, we 60 // generated code. Because generated code on arm uses the C stack, we
61 // just use the C stack limit. 61 // just use the C stack limit.
62 class SimulatorStack : public v8::internal::AllStatic { 62 class SimulatorStack : public v8::internal::AllStatic {
63 public: 63 public:
64 static inline uintptr_t JsLimitFromCLimit(uintptr_t c_limit) { 64 static inline uintptr_t JsLimitFromCLimit(uintptr_t c_limit) {
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 357
358 // When running with the simulator transition into simulated execution at this 358 // When running with the simulator transition into simulated execution at this
359 // point. 359 // point.
360 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \ 360 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
361 reinterpret_cast<Object*>(Simulator::current()->Call( \ 361 reinterpret_cast<Object*>(Simulator::current()->Call( \
362 FUNCTION_ADDR(entry), 5, p0, p1, p2, p3, p4)) 362 FUNCTION_ADDR(entry), 5, p0, p1, p2, p3, p4))
363 363
364 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6) \ 364 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6) \
365 Simulator::current()->Call( \ 365 Simulator::current()->Call( \
366 FUNCTION_ADDR(entry), 7, p0, p1, p2, p3, p4, p5, p6) 366 FUNCTION_ADDR(entry), 8, p0, p1, p2, p3, NULL, p4, p5, p6)
367 367
368 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \ 368 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \
369 try_catch_address == \ 369 try_catch_address == \
370 NULL ? NULL : *(reinterpret_cast<TryCatch**>(try_catch_address)) 370 NULL ? NULL : *(reinterpret_cast<TryCatch**>(try_catch_address))
371 371
372 372
373 // The simulator has its own stack. Thus it has a different stack limit from 373 // The simulator has its own stack. Thus it has a different stack limit from
374 // the C-based native code. Setting the c_limit to indicate a very small 374 // the C-based native code. Setting the c_limit to indicate a very small
375 // stack cause stack overflow errors, since the simulator ignores the input. 375 // stack cause stack overflow errors, since the simulator ignores the input.
376 // This is unlikely to be an issue in practice, though it might cause testing 376 // This is unlikely to be an issue in practice, though it might cause testing
(...skipping 11 matching lines...) Expand all
388 388
389 static inline void UnregisterCTryCatch() { 389 static inline void UnregisterCTryCatch() {
390 Simulator::current()->PopAddress(); 390 Simulator::current()->PopAddress();
391 } 391 }
392 }; 392 };
393 393
394 } } // namespace v8::internal 394 } } // namespace v8::internal
395 395
396 #endif // !defined(USE_SIMULATOR) 396 #endif // !defined(USE_SIMULATOR)
397 #endif // V8_ARM_SIMULATOR_ARM_H_ 397 #endif // V8_ARM_SIMULATOR_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698