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