OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 using namespace v8::internal; | 36 using namespace v8::internal; |
37 | 37 |
38 | 38 |
39 // Define these function prototypes to match JSEntryFunction in execution.cc. | 39 // Define these function prototypes to match JSEntryFunction in execution.cc. |
40 typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4); | 40 typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4); |
41 typedef Object* (*F2)(int x, int y, int p2, int p3, int p4); | 41 typedef Object* (*F2)(int x, int y, int p2, int p3, int p4); |
42 typedef Object* (*F3)(void* p0, int p1, int p2, int p3, int p4); | 42 typedef Object* (*F3)(void* p0, int p1, int p2, int p3, int p4); |
43 typedef Object* (*F4)(void* p0, void* p1, int p2, int p3, int p4); | 43 typedef Object* (*F4)(void* p0, void* p1, int p2, int p3, int p4); |
44 | 44 |
45 | |
46 static v8::Persistent<v8::Context> env; | 45 static v8::Persistent<v8::Context> env; |
47 | 46 |
48 | 47 |
49 static void InitializeVM() { | 48 static void InitializeVM() { |
50 if (env.IsEmpty()) { | 49 if (env.IsEmpty()) { |
51 env = v8::Context::New(); | 50 env = v8::Context::New(); |
52 } | 51 } |
53 } | 52 } |
54 | 53 |
55 | 54 |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 Object* dummy = CALL_GENERATED_CODE(f, &i, 0, 0, 0, 0); | 1003 Object* dummy = CALL_GENERATED_CODE(f, &i, 0, 0, 0, 0); |
1005 USE(dummy); | 1004 USE(dummy); |
1006 | 1005 |
1007 CHECK_EQ(0xabcd0001, i.a); | 1006 CHECK_EQ(0xabcd0001, i.a); |
1008 CHECK_EQ(static_cast<int32_t>(0xabcd0000) >> 1, i.b); | 1007 CHECK_EQ(static_cast<int32_t>(0xabcd0000) >> 1, i.b); |
1009 CHECK_EQ(0x00000000, i.c); | 1008 CHECK_EQ(0x00000000, i.c); |
1010 CHECK_EQ(0xffffffff, i.d); | 1009 CHECK_EQ(0xffffffff, i.d); |
1011 } | 1010 } |
1012 | 1011 |
1013 #undef __ | 1012 #undef __ |
OLD | NEW |