The Trunk: Tests-eem.438.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tests-eem.438.mcz

commits-2
Eliot Miranda uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-eem.438.mcz

==================== Summary ====================

Name: Tests-eem.438
Author: eem
Time: 2 October 2020, 12:20:47.276738 pm
UUID: 13a36e35-c178-4b73-ba5b-0c66407c6d1a
Ancestors: Tests-ct.437

ClosureCompilerTest: startKeysToBlockExtents has moved from CompiledMethod to DebuggerMethodMap.

=============== Diff against Tests-ct.437 ===============

Item was changed:
  ----- Method: ClosureCompilerTest>>testBlockNumbering (in category 'tests') -----
  testBlockNumbering
  "Test that the compiler and CompiledMethod agree on the block numbering of a substantial doit."
  "self new testBlockNumbering"
 
  self bytecodeSetClassesForTests do:
  [:class| | methodNode method tempRefs |
  methodNode :=
  Parser new
  encoderClass: EncoderForV3PlusClosures;
  parse: 'foo
  | numCopiedValuesCounts |
  numCopiedValuesCounts := Dictionary new.
  0 to: 32 do: [:i| numCopiedValuesCounts at: i put: 0].
  Transcript clear.
  Smalltalk allClasses remove: GeniePlugin; do:
  [:c|
  {c. c class} do:
  [:b|
  Transcript nextPut: b name first; endEntry.
  b selectorsAndMethodsDo:
  [:s :m| | pn |
  m isQuick not ifTrue:
  [pn := b parserClass new
  encoderClass: EncoderForV3PlusClosures;
  parse: (b sourceCodeAt: s)
  class: b.
  pn generate.
  [pn accept: nil]
  on: MessageNotUnderstood
  do: [:ex| | msg numCopied |
  msg := ex message.
  (msg selector == #visitBlockNode:
  and: [(msg argument instVarNamed: ''optimized'') not]) ifTrue:
  [numCopied := (msg argument computeCopiedValues: pn) size.
  numCopiedValuesCounts
  at: numCopied
  put: (numCopiedValuesCounts at: numCopied) + 1].
  msg setSelector: #==.
  ex resume: nil]]]]].
  numCopiedValuesCounts'
  class: Object.
  method := methodNode generate.
  tempRefs := methodNode encoder blockExtentsToTempsMap.
+ self assert: tempRefs keys asSet equals: method debuggerMap startKeysToBlockExtents values asSet]!
- self assert: tempRefs keys asSet equals: method startKeysToBlockExtents values asSet]!

Item was changed:
  ----- Method: ClosureCompilerTest>>testBlockNumberingForInjectInto (in category 'tests') -----
  testBlockNumberingForInjectInto
  "Test that the compiler and CompiledMethod agree on the block numbering of Collection>>inject:into:
  and that temp names for inject:into: are recorded."
  "self new testBlockNumberingForInjectInto"
  self bytecodeSetClassesForTests do:
  [:class| | methodNode method tempRefs |
  methodNode := Parser new
  encoderClass: EncoderForV3PlusClosures;
  parse: (Collection sourceCodeAt: #inject:into:)
  class: Collection.
  method := methodNode generate.
  tempRefs := methodNode encoder blockExtentsToTempsMap.
+ self assert: tempRefs keys asSet equals: method debuggerMap startKeysToBlockExtents values asSet.
- self assert: tempRefs keys asSet equals: method startKeysToBlockExtents values asSet.
  self assert: ((tempRefs includesKey: (0 to: 6))
  and: [(tempRefs at: (0 to: 6)) hasEqualElements: #(('thisValue' 1) ('binaryBlock' 2) ('nextValue' (3 1)))]).
  self assert: ((tempRefs includesKey: (2 to: 4))
  and: [(tempRefs at: (2 to: 4)) hasEqualElements: #(('each' 1) ('binaryBlock' 2) ('nextValue' (3 1)))])]!