OLD | NEW |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // it in a variable with the given name. If the object is not of the | 71 // it in a variable with the given name. If the object is not of the |
72 // expected type call IllegalOperation and return. | 72 // expected type call IllegalOperation and return. |
73 #define CONVERT_ARG_CHECKED(Type, name, index) \ | 73 #define CONVERT_ARG_CHECKED(Type, name, index) \ |
74 RUNTIME_ASSERT(args[index]->Is##Type()); \ | 74 RUNTIME_ASSERT(args[index]->Is##Type()); \ |
75 Type* name = Type::cast(args[index]); | 75 Type* name = Type::cast(args[index]); |
76 | 76 |
77 #define CONVERT_ARG_HANDLE_CHECKED(Type, name, index) \ | 77 #define CONVERT_ARG_HANDLE_CHECKED(Type, name, index) \ |
78 RUNTIME_ASSERT(args[index]->Is##Type()); \ | 78 RUNTIME_ASSERT(args[index]->Is##Type()); \ |
79 Handle<Type> name = args.at<Type>(index); | 79 Handle<Type> name = args.at<Type>(index); |
80 | 80 |
| 81 #define CONVERT_ARG_STUB_CALLER_ARGS(name) \ |
| 82 Arguments* name = reinterpret_cast<Arguments*>(args[0]); |
| 83 |
81 // Cast the given object to a boolean and store it in a variable with | 84 // Cast the given object to a boolean and store it in a variable with |
82 // the given name. If the object is not a boolean call IllegalOperation | 85 // the given name. If the object is not a boolean call IllegalOperation |
83 // and return. | 86 // and return. |
84 #define CONVERT_BOOLEAN_ARG_CHECKED(name, index) \ | 87 #define CONVERT_BOOLEAN_ARG_CHECKED(name, index) \ |
85 RUNTIME_ASSERT(args[index]->IsBoolean()); \ | 88 RUNTIME_ASSERT(args[index]->IsBoolean()); \ |
86 bool name = args[index]->IsTrue(); | 89 bool name = args[index]->IsTrue(); |
87 | 90 |
88 // Cast the given argument to a Smi and store its value in an int variable | 91 // Cast the given argument to a Smi and store its value in an int variable |
89 // with the given name. If the argument is not a Smi call IllegalOperation | 92 // with the given name. If the argument is not a Smi call IllegalOperation |
90 // and return. | 93 // and return. |
(...skipping 13436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13527 // Handle last resort GC and make sure to allow future allocations | 13530 // Handle last resort GC and make sure to allow future allocations |
13528 // to grow the heap without causing GCs (if possible). | 13531 // to grow the heap without causing GCs (if possible). |
13529 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13532 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13530 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13533 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13531 "Runtime::PerformGC"); | 13534 "Runtime::PerformGC"); |
13532 } | 13535 } |
13533 } | 13536 } |
13534 | 13537 |
13535 | 13538 |
13536 } } // namespace v8::internal | 13539 } } // namespace v8::internal |
OLD | NEW |