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

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

Issue 521028: Direct call to native RegExp code from JavaScript (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/arm/regexp-macro-assembler-arm.cc ('k') | src/assembler.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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { 56 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) {
57 return try_catch_address; 57 return try_catch_address;
58 } 58 }
59 59
60 static inline void UnregisterCTryCatch() { } 60 static inline void UnregisterCTryCatch() { }
61 }; 61 };
62 62
63 63
64 // Call the generated regexp code directly. The entry function pointer should 64 // Call the generated regexp code directly. The entry function pointer should
65 // expect seven int/pointer sized arguments and return an int. 65 // expect eight int/pointer sized arguments and return an int.
66 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6) \ 66 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7) \
67 entry(p0, p1, p2, p3, p4, p5, p6) 67 entry(p0, p1, p2, p3, p4, p5, p6, p7)
68 68
69 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \ 69 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \
70 reinterpret_cast<TryCatch*>(try_catch_address) 70 reinterpret_cast<TryCatch*>(try_catch_address)
71 71
72 72
73 #else // defined(__arm__) 73 #else // defined(__arm__)
74 74
75 // When running with the simulator transition into simulated execution at this 75 // When running with the simulator transition into simulated execution at this
76 // point. 76 // point.
77 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \ 77 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
78 reinterpret_cast<Object*>( \ 78 reinterpret_cast<Object*>( \
79 assembler::arm::Simulator::current()->Call(FUNCTION_ADDR(entry), 5, \ 79 assembler::arm::Simulator::current()->Call(FUNCTION_ADDR(entry), 5, \
80 p0, p1, p2, p3, p4)) 80 p0, p1, p2, p3, p4))
81 81
82 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6) \ 82 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7) \
83 assembler::arm::Simulator::current()->Call( \ 83 assembler::arm::Simulator::current()->Call( \
84 FUNCTION_ADDR(entry), 7, p0, p1, p2, p3, p4, p5, p6) 84 FUNCTION_ADDR(entry), 8, p0, p1, p2, p3, p4, p5, p6, p7)
85 85
86 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \ 86 #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \
87 try_catch_address == NULL ? \ 87 try_catch_address == NULL ? \
88 NULL : *(reinterpret_cast<TryCatch**>(try_catch_address)) 88 NULL : *(reinterpret_cast<TryCatch**>(try_catch_address))
89 89
90 90
91 #include "constants-arm.h" 91 #include "constants-arm.h"
92 92
93 93
94 namespace assembler { 94 namespace assembler {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 static inline void UnregisterCTryCatch() { 298 static inline void UnregisterCTryCatch() {
299 assembler::arm::Simulator::current()->PopAddress(); 299 assembler::arm::Simulator::current()->PopAddress();
300 } 300 }
301 }; 301 };
302 302
303 303
304 #endif // defined(__arm__) 304 #endif // defined(__arm__)
305 305
306 #endif // V8_ARM_SIMULATOR_ARM_H_ 306 #endif // V8_ARM_SIMULATOR_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698