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

Side by Side Diff: src/builtins.cc

Issue 14139033: Clean up VMState a little bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fixed mistake Created 7 years, 8 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/macro-assembler-arm.cc ('k') | src/compiler.cc » ('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 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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 1314
1315 v8::Arguments new_args = v8::ImplementationUtilities::NewArguments( 1315 v8::Arguments new_args = v8::ImplementationUtilities::NewArguments(
1316 custom.end(), 1316 custom.end(),
1317 &args[0] - 1, 1317 &args[0] - 1,
1318 args.length() - 1, 1318 args.length() - 1,
1319 is_construct); 1319 is_construct);
1320 1320
1321 v8::Handle<v8::Value> value; 1321 v8::Handle<v8::Value> value;
1322 { 1322 {
1323 // Leaving JavaScript. 1323 // Leaving JavaScript.
1324 VMState state(isolate, EXTERNAL); 1324 VMState<EXTERNAL> state(isolate);
1325 ExternalCallbackScope call_scope(isolate, 1325 ExternalCallbackScope call_scope(isolate,
1326 v8::ToCData<Address>(callback_obj)); 1326 v8::ToCData<Address>(callback_obj));
1327 value = callback(new_args); 1327 value = callback(new_args);
1328 } 1328 }
1329 if (value.IsEmpty()) { 1329 if (value.IsEmpty()) {
1330 result = heap->undefined_value(); 1330 result = heap->undefined_value();
1331 } else { 1331 } else {
1332 result = *reinterpret_cast<Object**>(*value); 1332 result = *reinterpret_cast<Object**>(*value);
1333 result->VerifyApiCallResultType(); 1333 result->VerifyApiCallResultType();
1334 } 1334 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 v8::ImplementationUtilities::PrepareArgumentsData(custom.end(), 1391 v8::ImplementationUtilities::PrepareArgumentsData(custom.end(),
1392 isolate, call_data->data(), constructor, obj); 1392 isolate, call_data->data(), constructor, obj);
1393 v8::Arguments new_args = v8::ImplementationUtilities::NewArguments( 1393 v8::Arguments new_args = v8::ImplementationUtilities::NewArguments(
1394 custom.end(), 1394 custom.end(),
1395 &args[0] - 1, 1395 &args[0] - 1,
1396 args.length() - 1, 1396 args.length() - 1,
1397 is_construct_call); 1397 is_construct_call);
1398 v8::Handle<v8::Value> value; 1398 v8::Handle<v8::Value> value;
1399 { 1399 {
1400 // Leaving JavaScript. 1400 // Leaving JavaScript.
1401 VMState state(isolate, EXTERNAL); 1401 VMState<EXTERNAL> state(isolate);
1402 ExternalCallbackScope call_scope(isolate, 1402 ExternalCallbackScope call_scope(isolate,
1403 v8::ToCData<Address>(callback_obj)); 1403 v8::ToCData<Address>(callback_obj));
1404 value = callback(new_args); 1404 value = callback(new_args);
1405 } 1405 }
1406 if (value.IsEmpty()) { 1406 if (value.IsEmpty()) {
1407 result = heap->undefined_value(); 1407 result = heap->undefined_value();
1408 } else { 1408 } else {
1409 result = *reinterpret_cast<Object**>(*value); 1409 result = *reinterpret_cast<Object**>(*value);
1410 result->VerifyApiCallResultType(); 1410 result->VerifyApiCallResultType();
1411 } 1411 }
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 return Handle<Code>(code_address); \ 1867 return Handle<Code>(code_address); \
1868 } 1868 }
1869 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1869 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1870 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1870 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1871 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1871 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1872 #undef DEFINE_BUILTIN_ACCESSOR_C 1872 #undef DEFINE_BUILTIN_ACCESSOR_C
1873 #undef DEFINE_BUILTIN_ACCESSOR_A 1873 #undef DEFINE_BUILTIN_ACCESSOR_A
1874 1874
1875 1875
1876 } } // namespace v8::internal 1876 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698