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

Side by Side Diff: test/cctest/test-api.cc

Issue 5107002: Avoiding repacking payload for v8::Arguments and v8::AccessorInfo (arm). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 1 month 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
« src/builtins.cc ('K') | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 6998 matching lines...) Expand 10 before | Expand all | Expand 10 after
7009 int* call_count = reinterpret_cast<int*>(v8::External::Unwrap(info.Data())); 7009 int* call_count = reinterpret_cast<int*>(v8::External::Unwrap(info.Data()));
7010 ++(*call_count); 7010 ++(*call_count);
7011 if ((*call_count) % 20 == 0) { 7011 if ((*call_count) % 20 == 0) {
7012 i::Heap::CollectAllGarbage(true); 7012 i::Heap::CollectAllGarbage(true);
7013 } 7013 }
7014 return v8::Handle<Value>(); 7014 return v8::Handle<Value>();
7015 } 7015 }
7016 7016
7017 static v8::Handle<Value> FastApiCallback_TrivialSignature( 7017 static v8::Handle<Value> FastApiCallback_TrivialSignature(
7018 const v8::Arguments& args) { 7018 const v8::Arguments& args) {
7019 CHECK_EQ(args.Data(), v8_str("method_data"));
antonm 2010/11/17 14:10:32 nit: indent
SeRya 2010/11/17 15:36:29 It was for debugging. Reverted.
7020
7019 ApiTestFuzzer::Fuzz(); 7021 ApiTestFuzzer::Fuzz();
7020 CHECK_EQ(args.This(), args.Holder()); 7022 CHECK_EQ(args.This(), args.Holder());
7021 CHECK(args.Data()->Equals(v8_str("method_data"))); 7023 CHECK(args.Data()->Equals(v8_str("method_data")));
7022 return v8::Integer::New(args[0]->Int32Value() + 1); 7024 return v8::Integer::New(args[0]->Int32Value() + 1);
7023 } 7025 }
7024 7026
7025 static v8::Handle<Value> FastApiCallback_SimpleSignature( 7027 static v8::Handle<Value> FastApiCallback_SimpleSignature(
7026 const v8::Arguments& args) { 7028 const v8::Arguments& args) {
7027 ApiTestFuzzer::Fuzz(); 7029 ApiTestFuzzer::Fuzz();
7028 CHECK_EQ(args.This()->GetPrototype(), args.Holder()); 7030 CHECK_EQ(args.This()->GetPrototype(), args.Holder());
(...skipping 4736 matching lines...) Expand 10 before | Expand all | Expand 10 after
11765 v8::Context::Scope context_scope(context.local()); 11767 v8::Context::Scope context_scope(context.local());
11766 11768
11767 v8::Handle<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New(); 11769 v8::Handle<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New();
11768 tmpl->SetNamedPropertyHandler(Getter, NULL, NULL, NULL, Enumerator); 11770 tmpl->SetNamedPropertyHandler(Getter, NULL, NULL, NULL, Enumerator);
11769 context->Global()->Set(v8_str("o"), tmpl->NewInstance()); 11771 context->Global()->Set(v8_str("o"), tmpl->NewInstance());
11770 v8::Handle<v8::Array> result = v8::Handle<v8::Array>::Cast(CompileRun( 11772 v8::Handle<v8::Array> result = v8::Handle<v8::Array>::Cast(CompileRun(
11771 "var result = []; for (var k in o) result.push(k); result")); 11773 "var result = []; for (var k in o) result.push(k); result"));
11772 CHECK_EQ(1, result->Length()); 11774 CHECK_EQ(1, result->Length());
11773 CHECK_EQ(v8_str("universalAnswer"), result->Get(0)); 11775 CHECK_EQ(v8_str("universalAnswer"), result->Get(0));
11774 } 11776 }
OLDNEW
« src/builtins.cc ('K') | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698