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

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

Issue 6624085: [Isolates] Merge 7051:7083 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 9 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/x64/macro-assembler-x64.cc ('k') | test/cctest/test-heap.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 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 10625 matching lines...) Expand 10 before | Expand all | Expand 10 after
10636 CHECK_EQ(28, result->Int32Value()); 10636 CHECK_EQ(28, result->Int32Value());
10637 10637
10638 result = CompileRun("var sum = 0;" 10638 result = CompileRun("var sum = 0;"
10639 "for (var i = 0; i < 8; i++) {" 10639 "for (var i = 0; i < 8; i++) {"
10640 " sum += pixels[i];" 10640 " sum += pixels[i];"
10641 "}" 10641 "}"
10642 "sum;"); 10642 "sum;");
10643 CHECK_EQ(28, result->Int32Value()); 10643 CHECK_EQ(28, result->Int32Value());
10644 10644
10645 i::Handle<i::Smi> value(i::Smi::FromInt(2)); 10645 i::Handle<i::Smi> value(i::Smi::FromInt(2));
10646 i::SetElement(jsobj, 1, value); 10646 i::SetElement(jsobj, 1, value, i::kNonStrictMode);
10647 CHECK_EQ(2, i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value()); 10647 CHECK_EQ(2, i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value());
10648 *value.location() = i::Smi::FromInt(256); 10648 *value.location() = i::Smi::FromInt(256);
10649 i::SetElement(jsobj, 1, value); 10649 i::SetElement(jsobj, 1, value, i::kNonStrictMode);
10650 CHECK_EQ(255, 10650 CHECK_EQ(255,
10651 i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value()); 10651 i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value());
10652 *value.location() = i::Smi::FromInt(-1); 10652 *value.location() = i::Smi::FromInt(-1);
10653 i::SetElement(jsobj, 1, value); 10653 i::SetElement(jsobj, 1, value, i::kNonStrictMode);
10654 CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value()); 10654 CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value());
10655 10655
10656 result = CompileRun("for (var i = 0; i < 8; i++) {" 10656 result = CompileRun("for (var i = 0; i < 8; i++) {"
10657 " pixels[i] = (i * 65) - 109;" 10657 " pixels[i] = (i * 65) - 109;"
10658 "}" 10658 "}"
10659 "pixels[1] + pixels[6];"); 10659 "pixels[1] + pixels[6];");
10660 CHECK_EQ(255, result->Int32Value()); 10660 CHECK_EQ(255, result->Int32Value());
10661 CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(0)->ToObjectChecked())->value()); 10661 CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(0)->ToObjectChecked())->value());
10662 CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value()); 10662 CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(1)->ToObjectChecked())->value());
10663 CHECK_EQ(21, 10663 CHECK_EQ(21,
(...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
13189 v8::Handle<v8::Function> define_property = 13189 v8::Handle<v8::Function> define_property =
13190 CompileRun("(function() {" 13190 CompileRun("(function() {"
13191 " Object.defineProperty(" 13191 " Object.defineProperty("
13192 " this," 13192 " this,"
13193 " 1," 13193 " 1,"
13194 " { configurable: true, enumerable: true, value: 3 });" 13194 " { configurable: true, enumerable: true, value: 3 });"
13195 "})").As<Function>(); 13195 "})").As<Function>();
13196 context->DetachGlobal(); 13196 context->DetachGlobal();
13197 define_property->Call(proxy, 0, NULL); 13197 define_property->Call(proxy, 0, NULL);
13198 } 13198 }
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698