Reviewers: jochen, baptiste.afsa1,

Message:
PTAL

Description:
A64: Add a test for HToFastProperties.

TEST=mjsunit/compiler/to-fast-properties

Please review this at https://codereview.chromium.org/147573003/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/a64

Affected files (+14, -23 lines):
  M src/a64/lithium-codegen-a64.cc
  A + test/mjsunit/compiler/to-fast-properties.js


Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index 56b29ceb09e0d5d9622517e584476bdc2a57e702..ca530b782e46b22f988492b0cbd677a979164589 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -5160,7 +5160,6 @@ void LCodeGen::DoThisFunction(LThisFunction* instr) {
 void LCodeGen::DoToFastProperties(LToFastProperties* instr) {
   ASSERT(ToRegister(instr->value()).Is(x0));
   ASSERT(ToRegister(instr->result()).Is(x0));
-  ASM_UNIMPLEMENTED_BREAK("DoToFastProperties");
   __ Push(x0);
   CallRuntime(Runtime::kToFastProperties, 1, instr);
 }
Index: test/mjsunit/compiler/to-fast-properties.js
diff --git a/test/message/try-catch-finally-no-message.js b/test/mjsunit/compiler/to-fast-properties.js
similarity index 77%
copy from test/message/try-catch-finally-no-message.js
copy to test/mjsunit/compiler/to-fast-properties.js
index 6459ed80e3331154dc3a9e1edbcd964f25773dd4..26829d95e9bcb94049b3b464ec47c33ca529255e 100644
--- a/test/message/try-catch-finally-no-message.js
+++ b/test/mjsunit/compiler/to-fast-properties.js
@@ -1,4 +1,4 @@
-// Copyright 2008 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
 // met:
@@ -25,27 +25,19 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-function f() {
-  try {
-    throw "foo";
-  } catch (e) {
-    throw "bar";
-  } finally {
-    return 4;
-  }
-}
+// This test requires OSR or --stress-runs=3 to optimize the top level script.

-function g() {
-  while (true) {
-    try {
-      throw "foo";
-    } catch (e) {
-      throw "bar";
-    } finally {
-      break;
-    }
+for (var i = 0; i < 3; i++) {
+  // HToFastProperties is used for top-level object literals that have
+  // function property.
+  var obj = {
+    index: function() { return i; },
+    x: 0
   }
+  var n = 10000;
+  // Loop to hit OSR.
+  for (var j = 0; j < n; j++) {
+    obj.x += i;
+  }
+  assertEquals(obj.index() * n, obj.x);
 }
-
-f();
-g();


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to