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

Side by Side Diff: test/cctest/test-assembler-ia32.cc

Issue 108063003: Removed internal uses of (almost) deprecated FunctionTemplate::New version. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 7 years 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 | « test/cctest/test-api.cc ('k') | test/cctest/test-assembler-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 528
529 TEST(StackAlignmentForSSE2) { 529 TEST(StackAlignmentForSSE2) {
530 CcTest::InitializeVM(); 530 CcTest::InitializeVM();
531 if (!CpuFeatures::IsSupported(SSE2)) return; 531 if (!CpuFeatures::IsSupported(SSE2)) return;
532 532
533 CHECK_EQ(0, OS::ActivationFrameAlignment() % 16); 533 CHECK_EQ(0, OS::ActivationFrameAlignment() % 16);
534 534
535 v8::Isolate* isolate = CcTest::isolate(); 535 v8::Isolate* isolate = CcTest::isolate();
536 v8::HandleScope handle_scope(isolate); 536 v8::HandleScope handle_scope(isolate);
537 v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New(); 537 v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
538 global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(DoSSE2)); 538 global_template->Set(v8_str("do_sse2"),
539 v8::FunctionTemplate::New(isolate, DoSSE2));
539 540
540 LocalContext env(NULL, global_template); 541 LocalContext env(NULL, global_template);
541 CompileRun( 542 CompileRun(
542 "function foo(vec) {" 543 "function foo(vec) {"
543 " return do_sse2(vec);" 544 " return do_sse2(vec);"
544 "}"); 545 "}");
545 546
546 v8::Local<v8::Object> global_object = env->Global(); 547 v8::Local<v8::Object> global_object = env->Global();
547 v8::Local<v8::Function> foo = 548 v8::Local<v8::Function> foo =
548 v8::Local<v8::Function>::Cast(global_object->Get(v8_str("foo"))); 549 v8::Local<v8::Function>::Cast(global_object->Get(v8_str("foo")));
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 #ifdef OBJECT_PRINT 634 #ifdef OBJECT_PRINT
634 Code::cast(code)->Print(); 635 Code::cast(code)->Print();
635 #endif 636 #endif
636 637
637 F8 f = FUNCTION_CAST<F8>(Code::cast(code)->entry()); 638 F8 f = FUNCTION_CAST<F8>(Code::cast(code)->entry());
638 CHECK_EQ(2, f(1.0, 2.0)); 639 CHECK_EQ(2, f(1.0, 2.0));
639 } 640 }
640 641
641 642
642 #undef __ 643 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698