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

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

Issue 384003003: Replace AddProperty by AddNamedProperty to speed up the common case (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/weak_collection.js ('k') | test/mjsunit/regress/regress-1199637.js » ('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 21616 matching lines...) Expand 10 before | Expand all | Expand 10 after
21627 CHECK(access_check_fail_thrown); 21627 CHECK(access_check_fail_thrown);
21628 CHECK(try_catch.HasCaught()); 21628 CHECK(try_catch.HasCaught());
21629 } 21629 }
21630 21630
21631 CheckCorrectThrow("other.x"); 21631 CheckCorrectThrow("other.x");
21632 CheckCorrectThrow("other[1]"); 21632 CheckCorrectThrow("other[1]");
21633 CheckCorrectThrow("JSON.stringify(other)"); 21633 CheckCorrectThrow("JSON.stringify(other)");
21634 CheckCorrectThrow("has_own_property(other, 'x')"); 21634 CheckCorrectThrow("has_own_property(other, 'x')");
21635 CheckCorrectThrow("%GetProperty(other, 'x')"); 21635 CheckCorrectThrow("%GetProperty(other, 'x')");
21636 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); 21636 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)");
21637 CheckCorrectThrow("%AddProperty(other, 'x', 'foo', 1)"); 21637 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)");
21638 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); 21638 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)");
21639 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); 21639 CheckCorrectThrow("%DeleteProperty(other, '1', 0)");
21640 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); 21640 CheckCorrectThrow("%HasOwnProperty(other, 'x')");
21641 CheckCorrectThrow("%HasProperty(other, 'x')"); 21641 CheckCorrectThrow("%HasProperty(other, 'x')");
21642 CheckCorrectThrow("%HasElement(other, 1)"); 21642 CheckCorrectThrow("%HasElement(other, 1)");
21643 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); 21643 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')");
21644 CheckCorrectThrow("%GetPropertyNames(other)"); 21644 CheckCorrectThrow("%GetPropertyNames(other)");
21645 // PROPERTY_ATTRIBUTES_NONE = 0 21645 // PROPERTY_ATTRIBUTES_NONE = 0
21646 CheckCorrectThrow("%GetOwnPropertyNames(other, 0)"); 21646 CheckCorrectThrow("%GetOwnPropertyNames(other, 0)");
21647 CheckCorrectThrow("%DefineAccessorPropertyUnchecked(" 21647 CheckCorrectThrow("%DefineAccessorPropertyUnchecked("
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
22778 desc = x->GetOwnPropertyDescriptor(v8_str("p1")); 22778 desc = x->GetOwnPropertyDescriptor(v8_str("p1"));
22779 Local<Function> set = 22779 Local<Function> set =
22780 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("set"))); 22780 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("set")));
22781 Local<Function> get = 22781 Local<Function> get =
22782 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("get"))); 22782 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("get")));
22783 CHECK_EQ(v8_num(13), get->Call(x, 0, NULL)); 22783 CHECK_EQ(v8_num(13), get->Call(x, 0, NULL));
22784 Handle<Value> args[] = { v8_num(14) }; 22784 Handle<Value> args[] = { v8_num(14) };
22785 set->Call(x, 1, args); 22785 set->Call(x, 1, args);
22786 CHECK_EQ(v8_num(14), get->Call(x, 0, NULL)); 22786 CHECK_EQ(v8_num(14), get->Call(x, 0, NULL));
22787 } 22787 }
OLDNEW
« no previous file with comments | « src/weak_collection.js ('k') | test/mjsunit/regress/regress-1199637.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698