Reviewers: rmcilroy, Yang, vogelheim,
Message:
Please take a look.
Description:
Extend snapshot creation to generate 4-byte values
Please review this at https://codereview.chromium.org/623993002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+9, -3 lines):
M tools/js2c.py
Index: tools/js2c.py
diff --git a/tools/js2c.py b/tools/js2c.py
index
77485f6e22f5f698cbf7632c3fd7a3972ee6d2c2..9cbdcded614f94b5351d2b9f80e7ed96dc1418e7
100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -498,9 +498,15 @@ def CompressMaybe(sources, compression_type):
def PutInt(blob_file, value):
- assert(value >= 0 and value < (1 << 20))
- size = 1 if (value < 1 << 6) else (2 if (value < 1 << 14) else 3)
- value_with_length = (value << 2) | size
+ assert(value >= 0 and value < (1 << 28))
+ size = 4
+ if (value < 1 << 6):
+ size = 1
+ elif (value < 1 << 14):
+ size = 2
+ elif (value < 1 << 22):
+ size = 3
+ value_with_length = (value << 2) | (size - 1)
byte_sequence = bytearray()
for i in xrange(size):
--
--
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/d/optout.