| 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 13426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13517 // Handle last resort GC and make sure to allow future allocations | 13520 // Handle last resort GC and make sure to allow future allocations |
| 13518 // to grow the heap without causing GCs (if possible). | 13521 // to grow the heap without causing GCs (if possible). |
| 13519 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13522 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13520 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13523 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13521 "Runtime::PerformGC"); | 13524 "Runtime::PerformGC"); |
| 13522 } | 13525 } |
| 13523 } | 13526 } |
| 13524 | 13527 |
| 13525 | 13528 |
| 13526 } } // namespace v8::internal | 13529 } } // namespace v8::internal |
| OLD | NEW |